#ifndef DAGRAPHICSRESIZEABLETEXTITEM_H
#define DAGRAPHICSRESIZEABLETEXTITEM_H

#include <QGraphicsTextItem>
#include "DAGraphicsResizeableItem.h"
namespace DA
{
/**
 * @brief 支持缩放编辑的文本框Item
 */
class DAGRAPHICSVIEW_API DAGraphicsResizeableTextItem : public DAGraphicsResizeableItem
{
public:
    DAGraphicsResizeableTextItem(QGraphicsItem* parent = nullptr);

protected:
    void setBodySize(const QSizeF& s) override;
    void paintBody(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget, const QRectF& bodyRect) override;

private:
    QGraphicsTextItem* m_textItem;
};
}
#endif  // DAGRAPHICSRESIZEABLETEXTITEM_H
